package cqie.cn.frame.exception;

import io.swagger.annotations.ApiModel;

/**
 * @author 王林
 * @version 1.0
 * @date 2021-09-06 周一
 * @time 10:15
 * @description
 */
@ApiModel(value = "异常枚举类")
public enum  ExceptionEnum {

    //    SUCCESS(200,"操作成功"),
    ERROR(201,"操作失败!"),

    NULL_ERR(1000,"关键参数不能为空!"),

    TOKEN_ERR(1001,"token无效!"),

    AUTH_ERR(1002,"没有此操作权限!"),

    TOKEN_NULL(1002,"登录信息为空，请尝试重新登录或清除缓存"),

    TOKENINVALD(1003,"token超时已失效!"),

    PASSWORD_ERR(1004,"用户名或密码错误!"),

    OLD_PASSWORD_ERR(1005,"原密码错误!"),

    USERTYPE_ERR(1006,"用户类型不存在!"),

    DATABASE_OPERATION_ERR(1007,"数据库操作失败!"),

    NOT_FIND_DETAIL(1008,"未找到此条数据!"),

    UPLOAD_FILE_FAILED(1008,"上传文件失败!"),

    EXCEL_ERR(1009,"请检查excel文件格式!"),

    NOTFIND(404,"未找到接口!");

    private int code;

    private String msg;

    ExceptionEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
